Skip to content

Polish invites and friend chats: friend Bot placeholder, one invite control, Add friend auto-close, Sharing hint - #504

Merged
Birfy merged 4 commits into
ThinkFlowLab:mainfrom
Birfy:fix/499-invite-friendchat-polish
Oct 20, 2026
Merged

Birfy merged 4 commits into
ThinkFlowLab:mainfrom
Birfy:fix/499-invite-friendchat-polish

Conversation

@Birfy

@Birfy Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Fixes #499

What / why (owner decision 2026-10-20, option (a): all four polish items)

  1. Friend's Bot placeholder (regression of Friend's Bot chat on the receiving home: 'Tool removed' line, turns/steps/tok/s footer, composer placeholder flips to coding copy #419). The shell picks its composer copy by phase before it knows whose chat it is (hero copy on first open, coding copy after a send). HeaderPill now holds Message <Bot (owner)> through a new core/src/client/composer-label.js in a layout effect (before the first paint). It writes both aria-label and data-placeholder (before, only aria-label) and rewrites them inside the MutationObserver callback, with no rAF delay. On cleanup it gives back the shell's latest value.
  2. One invite control (inviteControls in plugins/social/client.js) in Add friend → Invite a friend and in Bot settings → Sharing. Before a link exists there is one button, Copy invite link for Chief, which makes the link and copies it. After that the link shows with Copy link / Copy with instructions / New link. Every copy note names the Bot: Invite link for Chief copied. / Invite for Chief copied with instructions.
  3. Add friend. The paste box is now a wrapping textarea, so the whole link shows; Enter still accepts. Typing clears a failed accept's error. After an accept that shared a Bot, the result shows for about 1.8 s, then the panel closes and opens the new friend's Bot if it is already listed. A join with no Bot, or a sent request, stays open until Done.
  4. Sharing hint. It reads Invite grants Chief only. and adds Revoke anytime in People with access. only once People with access lists someone. The empty list now reads Nobody has this Bot yet. Copy an invite link above and send it to a friend. People with access only gained an onGrants count callback; its grant logic is unchanged.

Tests

  • core/test/composer-label.test.js (jsdom): a friend's Bot composer reads Message Chief (SelfA1233) from the first paint (hero copy), after a send (coding copy) and after a remount, with no build/commands/@ files/sessions wording; it hands back on cleanup. looks.test.js checks that the header uses a layout effect.
  • plugins/social/test/social.test.js: the same control and Bot-named copy notes in Add friend and Sharing; the error clears when you type in the paste box; Enter accepts; auto-close plus opening the friend's Bot (only when a Bot was shared); the Revoke hint; wrapping paste box.

Ran at the tip: ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify passed (core 1079, social 299, tree 80, timeline 83, scripts 93, interop 37, live-e2e 16; plugin lint OK). Not run: live Mac instances, browser smoke.

Generated files were rebuilt: core/client.js, patches/ds-bot (0003/0008/0012 and new files/), changelog fragment changelog.d/499-invite-friendchat-polish.fixed.md. Docs: README (en/zh), docs/subsystems/social.md, docs/subsystems/core-client.md.

Risk tier: T2 (estimate; the controller sets the label)

…t, one invite control, Add friend auto-close, Sharing hint (ThinkFlowLab#499)
@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 20, 2026
@Birfy Birfy self-assigned this Oct 20, 2026
@Birfy Birfy added enhancement New feature or request area:social Friends, invites, grants, Bot Social area:ui Web/desktop UI and copy self-test Filed by the product self-test routine (issues only) labels Oct 20, 2026
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: c74a857
Ran:

  • ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify: passed (core lint + arch-docs OK, plugin lint OK, build-client --check OK, ds-bot-patches check OK; core 1079/1079, social 299/299, tree 80/80, timeline 83/83, scripts 93/93, interop 37/37, live-e2e 16/16). An earlier run had one flaky failure in the unrelated connectors.test.js (it passed 3 of 3 times alone and in the full rerun).
  • node .github/scripts/changelog.mjs check: 18 fragments well formed.
  • CI at the tip: tests-ok, test, plugins (social/tree/timeline), package, risk tier, reviewed tip all pass.
  • Diff reviewed against the owner design rules: English UI; per-Bot grants and People with access grant logic unchanged (only an onGrants count callback was added); no publish; no approval by typed reply; friend chats keep no turn limit or Extend; one + menu unchanged; hooks unconditional (ManageAccess effect before its early return, Sharing state in a new OwnBotSharing).
    Not run:
  • Live Mac instances or the production Bot Social server (not touched).
  • Browser smoke on two live homes (clipboard permission, wrapping textarea at sidebar width, auto-close timing); these are covered only by the unit tests and jsdom.

@Birfy Birfy added the awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip label Oct 20, 2026
@github-actions github-actions Bot added the risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff label Oct 20, 2026
…ThinkFlowLab#481/ThinkFlowLab#501/ThinkFlowLab#505)

Keep ThinkFlowLab#499 composer-label / data-placeholder docs with ThinkFlowLab#481 phone hold-card targets.
Regenerated client bundle patch after merge.
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: ebc484a
Ran:

Resolve social.md and social client with main's Share with a friend (ThinkFlowLab#500/ThinkFlowLab#516)
kept under OwnBotSharing alongside ThinkFlowLab#499 inviteControls and revoke hint.
Regenerate core client bundle and ds-bot patches. Update ThinkFlowLab#499 test for the
extra ShareWithFriend child.
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: eaed3f1
Ran:

  • ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify (pass)
  • reviewed diff at tip vs owner design rules
    Not run:
  • live Mac instances / production Bot Social

…chat-polish

# Conflicts:
#	patches/ds-bot/0008-client-bundle.patch
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: 347f18e
Ran:

  • git merge origin/main (eb91742, after Remind about approvals waiting 15 min, switch each notification kind, one notification per chat #492 and Social: neutral 'You already have …' on a re-accepted invite; clearer Remove confirm #503) into the branch, no rebase or force-push; only conflict was the generated patches/ds-bot/0008-client-bundle.patch
  • generated files regenerated, not hand-merged: took main's patches/ds-bot, then (cd core && npm run build), node scripts/ds-bot-patches.mjs generate, then check: ok (10 patches apply cleanly; core/ = ds-bot/ + patches)
  • ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify (core lint + arch-docs, plugin lint, build-client --check, ds-bot-patches check, all suites): pass, 0 failures (core 1100, social 312, tree 80, timeline 92, .github scripts 93, interop 37, live-e2e 16)
  • CI on this tip: all checks pass (tests-ok, Node 24 · DSH 0.2.0-rc.2, plugins social/timeline/tree, package, risk tier, reviewed tip); mergeable MERGEABLE, mergeStateStatus CLEAN
  • re-read the diff against main at this tip: changelog.d fragment kept, no CHANGELOG.md or ds-bot/ edits, owner design rules kept (approvals only via UI buttons, English UI, no separate Friends' Bots section, no turn limit or Extend in friend chats, connector tokens only at /mcp)
    Not run:
  • live Mac instances / production Bot Social

@Birfy
Birfy added this pull request to the merge queue Oct 20, 2026
Merged via the queue into ThinkFlowLab:main with commit 8c68aa7 Oct 20, 2026
8 checks passed
@Birfy
Birfy deleted the fix/499-invite-friendchat-polish branch October 20, 2026 11:08
github-merge-queue Bot pushed a commit that referenced this pull request Oct 20, 2026
…515)

Fixes #506.

## What
After #499/#504 renamed the Sharing control to **Copy invite link for
&lt;Bot&gt;**, host refusal text, the new-chat invite failure note, and
zh i18n still said **Bot settings → Invite to this Bot**. This PR
retargets those user-visible strings (and matching docs/comments/tests)
to **Bot settings → Sharing → Copy invite link**.

Based on `fix/499-invite-friendchat-polish` (#504) with `origin/main`
merged in so the leftover copy lands on top of the rename.

## Why
Those messages pointed at a button that no longer exists once #504
lands.

## Test
- `ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify` — pass (0 failures)
at tip
- `core/test/remote-room.test.js` ungranted-local assertion updated to
`Sharing → Copy invite link for Writer A`

## Risk tier
Risk tier: T2 (estimate; the controller sets the label) — copy/docs/i18n
only, no grant or transport behavior change.

Tip SHA: 6e7e9e6

Docs-not-needed: copy-only string and comment updates in owned files
(core-client, core-host, plugin-runtime, tree); no subsystem doc names
the old "Invite to this Bot" control, and social.md / team.md carry the
doc change.

---------

Co-authored-by: Birfy <15378933+Birfy@users.noreply.github.com>
@Birfy Birfy removed awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip agent-pr Pull request opened by an agent labels Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:social Friends, invites, grants, Bot Social area:ui Web/desktop UI and copy enhancement New feature or request risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff self-test Filed by the product self-test routine (issues only)

Projects

None yet

1 participant